package org.tongdao.yulong.service.impl;

import org.tongdao.yulong.BeanFactory;
import org.tongdao.yulong.dao.DemoDao;
import org.tongdao.yulong.dao.impl.DemoDaoImpl;
import org.tongdao.yulong.service.DemoService;

import java.util.List;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2020年09月27日 3:22 下午
 */
public class DemoServiceImpl implements DemoService {

  private DemoDao demoDao = (DemoDao) BeanFactory.getBean("demoDao");

  @Override
  public List<String> findAll() {
    for (int i = 0; i < 10; i++) {
      System.out.println(BeanFactory.getBean("demoDao"));
    }
    return demoDao.findAll();
  }
}
